<?php 
$front = Zend_Controller_Front::getInstance();
$parm = $front->getRequest()->getParams();
unset($parm['module']);
unset($parm['controller']);
unset($parm['action']);
unset($parm['buscar']);
unset($parm['pagina']);
//monta url
$url = '';
foreach($parm as $key => $p){
    $url .= '&'.$key.'='.$p;
}
if(strlen($url) > 0) $url = '?'.$url;

?>
<?php if(count($this->pagesInRange) > 1){  ?>
<div class="pagination">
    <!-- Link para a primeira página -->
    <?php if (isset($this->previous)): ?>
        <a class="current" title="Primeira Página" href="<?php echo $this->url(array('pagina' => $this->first)).$url; ?>">&laquo; Primeira</a>|
    <?php else: ?>
        <a class="current" title="Primeira Página" href="<?php echo $this->url(array('pagina' => $this->first)).$url; ?>">&laquo; Primeira</a>|
    <?php endif; ?>

    <!-- Link para a página anterior -->
    <?php /* if (isset($this->previous)): ?>
        <a class="current" title="Página Anterior" href="<?php echo $this->url(array('pagina' => $this->previous)); ?>">&laquo; Anterior</a>|
    <?php else: ?>
        <a  class="current" title="Página Anterior" href="<?php echo $this->url(array('pagina' => $this->previous)); ?>">&laquo; Anterior</a>|
    <?php endif; */ ?>

    <!-- Links numerados -->
    <?php foreach ($this->pagesInRange as $page): ?>
        <?php if ($page != $this->current): ?>
            <a class="numberPage" title="<?php echo $page; ?>" href="<?php echo $this->url(array('pagina' => $page)).$url; ?>"><?php echo $page; ?></a>|
        <?php else: ?>
            <a class="SetNumberPage" title="<?php echo $page; ?>" href="<?php echo $this->url(array('pagina' => $page)).$url; ?>"><?php echo $page; ?></a>|
        <?php endif; ?>
    <?php endforeach; ?>

    <!-- Link para a Próxima página -->
    <?php /* if (isset($this->next)): ?>
        <a class="current" title="Próxima Página" href="<?php echo $this->url(array('pagina' => $this->next)); ?>">Próxima &raquo;</a>|
    <?php else: ?>
        <a class="current" title="Próxima Página" href="<?php echo $this->url(array('pagina' => $this->next)); ?>">Próxima &raquo;</a>|
    <?php endif; */ ?>

    <!-- Última página -->
    <?php if (isset($this->next)): ?>
        <a class="current" title="Última Página" href="<?php echo $this->url(array('pagina' => $this->last)).$url; ?>">Última &raquo;</a>
    <?php else: ?>
        <a class="current" title="Última Página" href="<?php echo $this->url(array('pagina' => $this->last)).$url; ?>">Última &raquo;</a>
    <?php endif; ?>
</div>
<?php } ?>